/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.statistics.controller;

import java.util.List;
import queenb.net.entitybean.RP100;
import queenb.web.controller.QueenbController;
import queenb.web.statistics.store.RP100Store;

/**
 *
 * @author HP
 */
public class RP100Controller extends QueenbController {

    private RP100Store rpStore;
private int pnDay;
    public RP100Controller() {
        rpStore = new RP100Store();
        Object objDay = getRequest().getParameter("day");
        if(objDay!=null){
            this.pnDay = Integer.parseInt(objDay.toString());
        }
    }
    //N100R1 khach hang than thiet va tiem nang

    public List<RP100> getReportN100R1() {
        try {
            return rpStore.getRP100N100R1(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }

    //nguon khach hang cong ty
    public List<RP100> getReportN100R2() {
        try {
            return rpStore.getRP100N100R2(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
//trang thai khach hang
    public List<RP100> getReportN100R3() {
        try {
            return rpStore.getRP100N100R3(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
//theo nganh nge
    public List<RP100> getReportN100R4() {
        try {
            return rpStore.getRP100N100R4(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
//phan loai khach hangg. cong ty doi tac
    public List<RP100> getReportN100R5() {
        try {
            return rpStore.getRP100N100R5(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
// Thong ke khach hang va nhan vien co Passport sap het han
    public List<RP100> getReportN100R6() {
        try {
            return rpStore.getRP100N100R6(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
//Thong ke khach hang dduoc nhan vien gioi thieu
    public List<RP100> getReportN100R7() {
        try {
            return rpStore.getRP100N100R7(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
//Thong ke khach hang dduoc nhan vien chiu trach nhiem
    public List<RP100> getReportN100R8() {
        try {
            return rpStore.getRP100N100R8(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
    //Thong ke khach hang dduoc nhan vien chiu trach nhiem
    public List<RP100> getReportN100R9() {
        try {
            return rpStore.getRP100N100R9(getLogin().getModule(), getLogin().getCompanyNo(), this.getPnDay(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
    
    //KHACH HANG CONG TY
     public List<RP100> getReportK100R1() {
        try {
            return rpStore.getRP100K100R1(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }

    //nguon khach hang cong ty
    public List<RP100> getReportK100R2() {
        try {
            return rpStore.getRP100K100R2(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
//trang thai khach hang
    public List<RP100> getReportK100R3() {
        try {
            return rpStore.getRP100K100R3(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
//theo nganh nge
    public List<RP100> getReportK100R4() {
        try {
            return rpStore.getRP100K100R4(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
//phan loai khach hangg. cong ty doi tac
    public List<RP100> getReportK100R5() {
        try {
            return rpStore.getRP100K100R5(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
     public List<RP100> getReportK100R6() {
        try {
            return rpStore.getRP100K100R6(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }
// Thong ke khach hang va nhan vien co Passport sap het han
    public List<RP100> getReportK100R7() {
        try {
            return rpStore.getRP100K100R7(getLogin().getModule(), getLogin().getCompanyNo(), getLogin().getUserName());
        } catch (Exception ex) {
            return null;
        }
    }

    /**
     * @return the pnDay
     */
    public int getPnDay() {
        return pnDay;
    }

    /**
     * @param pnDay the pnDay to set
     */
    public void setPnDay(int pnDay) {
        this.pnDay = pnDay;
    }
}
